home *** CD-ROM | disk | FTP | other *** search
XSetup plugin | 2004-04-29 | 3.1 KB | 105 lines |
- "FILE"="Xteq Systems X-Setup Plugin 6.0"
- "TYPE"="9"
- "COUNT"="2"
- "UIPATH"="System\Software Installation\Add or Remove Programs"
- "NAME"="Add or Remove Programs Options (User)"
- "VERSION"="1.03"
- "OSVERSION"="0001011"
- "LANGUAGE"="VBScript"
- "TEXT 1"="Enable Logging"
- "TEXT 2"="Disable Logging"
- "DESCRIPTION 1"="The "Add/Remove Programs" applet inside the control panel can be configured as you wish by using the options here."
- "DESCRIPTION 2"="By default, all options are available but you might decide to disable some of the items listed here."
- "AUTHOR"="Xteq Systems"
- "CONTACTURL"="http://www.xteq.com"
- "COPYRIGHT"="Copyright ⌐ Xteq Systems - All Rights Reserved"
- "COMMENT 1"="Thanks to CptSiskoX [cptsiskox@hotmail.com] for the idea!"
-
- 'Declaration of some constants
- sPath="HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Uninstall\"
- sV1="NoAddRemovePrograms" 'Disable Add/Remove Programs
- sV2="NoRemovePage" 'Disable Change and Remove Programs
- sV3="NoAddPage" 'Disable Add Programs
- sV4="NoWindowsSetupPage" '- Disable Windows Components Wizard
- sV5="NoAddFromCDorFloppy" ' - Hide "Add a program from CD-ROM or disk" option
- sV6="NoAddFromInternet" ' - Hide "Add programs from Microsoft" option
- sV7="NoAddFromNetwork" ' - Hide "Add programs from your network" option
- sV8="NoChooseProgramsPage" 'show choose programs
- sV9="NoSupportInfo" ' - Disable Support Information
-
-
-
- 'Called when the Plugin is started
- SUB Plugin_Initialize
- Call SetUIElement(1,"*Enable Add/Remove Programs applet*")
- Call ReadIt(1,sV1)
-
- Call SetUIElement(2,"Show page 'Add or remove programs'")
- Call ReadIt(2,sV2)
-
- Call SetUIElement(3,"Show page 'Add New Programs'")
- Call ReadIt(3,sV3)
-
- Call SetUIElement(4,"Show page 'Add or Remove Windows components'")
- Call ReadIt(4,sV4)
-
- Call SetUIElement(5,"Show 'Add programs from CD or Floppy' command")
- Call ReadIt(5,sV5)
-
- Call SetUIElement(6,"Show 'Add programs from Windows Update' command")
- Call ReadIt(6,sV6)
-
- Call SetUIElement(7,"Show 'Add programs from the network' command")
- Call ReadIt(7,sV7)
-
- Call SetUIElement(8,"Show page 'Choose default programs'")
- Call ReadIt(8,sV8)
-
- Call SetUIElement(9,"Show 'Support Information' link for installed programs")
- Call ReadIt(9,sV9)
-
- End Sub
-
- Sub ReadIt(itm,val)
- s=RegReadValue(sPath & val)
- if s=0 or IsEmpty(s) then
- Call SetUIElementEx(itm,true)
- else
- Call SetUIElementEx(itm,false)
- end if
- End Sub
-
-
- 'Called when the Plugin should validate the Data the user has entered
- SUB Plugin_CheckData(ElementIndex)
- END SUB
-
- 'Called when the Plugin should apply the changes
- SUB Plugin_Apply(ElementIndex,ElementSubIndex)
- Call WriteIt(1,sV1)
- Call WriteIt(2,sV2)
- Call WriteIt(3,sV3)
- Call WriteIt(4,sV4)
- Call WriteIt(5,sV5)
- Call WriteIt(6,sV6)
- Call WriteIt(7,sV7)
- Call WriteIt(8,sV8)
- Call WriteIt(9,sV9)
- End Sub
-
- Sub WriteIt(itm,val)
- b=GetUIElementEx(itm)
- if b=true then
- if RegValueExists(sPath & val) then
- Call RegDeleteValue(sPath & val)
- end if
- else
- Call RegWriteValue(sPath & val,1,2)
- end if
- End Sub
-
-
- 'Called when the Plugin is about to be removed from memory
- SUB Plugin_Terminate
- END SUB
-